import { lazy } from "react";
import { createBrowserRouter, Navigate } from "react-router-dom";
import Home from "../pages/Home/Index";
const Ordear = lazy(() => import("../pages/Ordear/Index"));

export const RouterList = [
  {
    path: "/home/ordear",
    element: <Ordear />,
    title: "首页",
  },
];
const Router = createBrowserRouter([
  {
    path: "/",
    element: <Navigate to={"/home"}></Navigate>,
  },
  {
    path: "/home",
    element: <Home />,
    children: RouterList,
  },
]);
export default Router;
